﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
// NOM Library
using NomCafe;

namespace NomCafe
{
    public partial class Main : Form
    {
        private static SplashScreen splash;
        public Main()
        {
            InitializeComponent();                
        }

        private void Main_Load(object sender, EventArgs e)
        {
            #region "Close SplashScreen"
            splash = SplashScreen.Current;
            Activate();
            splash.CloseSplashScreen();
            #endregion

            #region "Call form Login"
            frmLogin __login = new frmLogin();
            __login.MdiParent = this;
            __login.Show();
            #endregion

        }
        #region "Close App"
        private void Main_FormClosing(object sender, FormClosingEventArgs e)
        {
            // Add by NHTU
            if (DialogResult.Yes != MessageBox.Show(
            "Bạn thật sự muốn thoát khỏi chương trình?",
            "NOM Cafe",
             MessageBoxButtons.YesNo,
             MessageBoxIcon.Question,
             MessageBoxDefaultButton.Button2))
            {
                e.Cancel = true;
            }
        }
        #endregion


    }
}
